package com.ihelin.insurance.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpSession;

/**
 * @author iHelin
 * @since 2021/2/27 15:00
 */
@Controller
public class AgentPageController {

    @GetMapping("/agent/index")
    public String index() {
        return "agent/index";
    }

    @GetMapping("/agent/customers")
    public String customers() {
        return "agent/customers";
    }

    @GetMapping("/agent/agents")
    public String agents() {
        return "agent/agents";
    }

    @GetMapping("/agent/performance")
    public String performance() {
        return "agent/performance";
    }

    @GetMapping("/agent/payment")
    public String payment() {
        return "agent/payment";
    }

    @GetMapping("/agent/feedback")
    public String feedback() {
        return "agent/feedback";
    }

    @GetMapping("/agent/register")
    public String register() {
        return "agent/register";
    }

    @GetMapping("/agent/login")
    public String login() {
        return "agent/login";
    }

    @GetMapping("/agent/logout")
    public String logout(HttpSession session) {
        session.removeAttribute("agentUser");
        return "redirect:/index";
    }

    @GetMapping("/agent/learning")
    public String learning() {
        return "agent/learning";
    }

}
